﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Game.Foundation;

namespace Game.Client
{
    public partial class GameChairClient : UserControl
    {
        public GameChairClient()
        {
            InitializeComponent();
        }

        public void SetPlayer(string playername, GameStatus status)
        {
            this.lblName.Text = playername;

            if (string.IsNullOrEmpty(playername))
            {
                btnJoin.Visible = true;
                return;
            }

            switch (status)
            {
                case GameStatus.Gaming:
                    this.lblName.ForeColor = Color.Red;
                    break;
                case GameStatus.Ready:
                    this.lblName.ForeColor = Color.Blue;
                    break;
                case GameStatus.Unready:
                    this.lblName.ForeColor = Color.Black;
                    break;
            }
        }
    }
}
